<?php

require_once __DIR__ . '/abstract/AbstractDAO.php';
require_once __DIR__ . '/../bean/SegmentoEJA.php';

/**
 * DAO para objetos SegmentoEJA.
 *
 * @author Hyzandey
 */
class SegmentoEJADAO extends AbstractDAO{
    
    const GET_ALL_QUERY = 
    'select * from segmento order by segmento';
    
    const QUERY_COLUMN = 'segmento';
    
    public function find() {
        $this->query = self::GET_ALL_QUERY;
        
        $this->executaQuery();
        
        $resultList = array();
        
        while($row = $this->proximaLinhaResultado()){
            $resultList [] = new SegmentoEJA($row[self::QUERY_COLUMN]); 
        }
        
        return $resultList;
    }
}

?>
